<script src="vue.js"></script>
<div id="app">
    <mcomponent name="titls"></mcomponent>
</div>
<script>
    Vue.component('mcomponent',{
        data(){

        },
        props:['name'],
        template:'<p>我是自定义组件{{name}}</p>'
    });
    var vue=new Vue({
        el:'#app',
    });
</script>